<?php
namespace data\service;

use data\model\PicFilesModel;

class PicFilesService extends BaseService {

    private $picFilesModel = null;

    public function __construct() {
        parent::__construct();
        $this->picFilesModel = new PicFilesModel();
    }

    public function register( $uid ,$files){
        $retVal = $this->picFilesModel->save([
            'uid' => $uid,
            'files' => $files,
            'ctime' => time(),
        ]);
        if( $retVal ){
            //如果注册成功，则存入redis
            return $this->picFilesModel->id;
        }
        return 0;
    }

}
